package application;

/**
 * Created with IntelliJ IDEA.
 * User: admin
 * Date: 20.05.14
 * Time: 20:00
 * To change this template use File | Settings | File Templates.
 */
public class testValue {
            public static void main(String[] args) {
            int arrayList[] = { 5,3,9,7,1,8 };
            int[] arrayResult;
            arrayResult = SortAscMethod(arrayList);
            }

        public static int[] SortAscMethod(int[] arr){
            int temp;
            for(int i=0; i < arr.length-1; i++){

                for(int j=1; j < arr.length-i; j++){
                    if(arr[j-1] > arr[j]){
                        temp=arr[j-1];
                        arr[j-1] = arr[j];
                        arr[j] = temp;
                    }
                }
                        }
            return arr;
                    }
      }